import request from '@/utils/request'

export function http_role_list(selectParam) {
    return request({
        url: '/role/list',
        method: 'get',
        params: {...selectParam}
    })
}


export function http_role_groupNames() {
    return request({
        url: '/role/getRoleGroupList',
        method: 'get',
    })
}

export function http_roleNames_groupId(selectParam) {
    return request({
        url: '/role/getRoleNameByGroupId?groupId='+selectParam.groupId,
        method: 'get',
    })
}

export function http_powers(roleId) {
    let data = {
        roleId
    }
    return request({
        url: '/power/list',
        method: 'post',
        params: data
    })
}

export function http_role_power_save(roleId,powerIds) {
    return request({
        url: '/power/save',
        method: 'post',
        params:  {roleId, powerIds}

    })
}


